<script>
	export default {
		onLaunch: function() {
			const menuButtonObject = uni.getMenuButtonBoundingClientRect()
			uni.getSystemInfo({
				success: res => {
					let statusBarHeight = res.statusBarHeight,
						navTop = menuButtonObject.top, //胶囊按钮与顶部的距离
						navHeight = 4 + statusBarHeight + menuButtonObject.height + (menuButtonObject.top -
							statusBarHeight) * 2; //导航高度
					this.globalData.navHeight = navHeight
					this.globalData.navTop = navTop
					this.globalData.windowHeight = res.windowHeight
					this.globalData.windowWidth = res.windowWidth
					this.globalData.menuButtonHeight = menuButtonObject.height
				},
				fail(err) {
					console.log(err);
				}
			})
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
